<%@ page import="home.beans.Note" %>
<%@ page import="java.util.List" %>
<%@ page import="home.db.NoteDAO" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/12/9
  Time: 21:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
  List<Note> data = NoteDAO.getNotes();
%>
<html>
  <head>
    <title>新建笔记</title>
  </head>
  <body>
    <form id="ff" action="newSave.do">
      <%
        String msg = (String) session.getAttribute("msg");
        session.removeAttribute("msg");
        if (msg != null) {
      %>
        <div style="color: red"><%= msg %></div>
      <%
        }
      %>
      <table>
        <tr>
          <td>笔记标题</td>
          <td><input name="title" type="text"/> </td>
        </tr>
        <tr>
          <td>笔记内容</td>
          <td><input name="content" type="text"/> </td>
        </tr>
      </table>
      <input type="button" value="保存笔记" onclick="document.getElementById('ff').submit()"/>
    </form>
  <br>

  </body>
</html>
